home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12044 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  913 b 

  1. Path: xara.net!SoNet!usenet
  2. From: Rob Catling <cats@aladdin.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: casting const
  5. Date: 28 Mar 1996 22:39:32 GMT
  6. Organization: RPC Software
  7. Message-ID: <4jf4f5$3aa@news.aladdin.co.uk>
  8. NNTP-Posting-Host: 193.119.120.81
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 1.22 (Windows; I; 16bit)
  13.  
  14.  
  15. I was wondering why you could pass a char * value as an argument to
  16. func(const char *) with no problem, but passing char ** value to 
  17. func(const char **) gives a compiler warning (unless you cast it).
  18.  
  19. The comp.lang.c FAQ was the only place that told me why I had to cast a function
  20. argument to (const **), however I'm still wondering:
  21.  
  22. 1) how was this pieced together from the references? ANSI C ref and H&S failed
  23.    to illuminate this for me.
  24.  
  25. 2) is this really an elegant language feature or a practical kludge ?
  26.  
  27. - Rob
  28.  
  29.